package com.young.coordin.server.model;

import com.young.common.util.Result;

/**
 * 错误码
 * Created by Admin on 2021/3/21.
 */
public enum CoordinResultEnum implements Result.IResultCode {

    SUCCESS(0, "成功", "成功")
    , PARAM_ERROR(6120101, "参数无效", "参数无效")
    , NONE_REGISTER(6120401, "客户端未注册", "客户端未注册")
    , LOW_VERSION(6120402, "客户端心跳版本号过低", "客户端心跳版本号过低(返回结果中是服务端最新版本号)")
    , HEARTBEAT_UPDATE_FAIL(6120501, "并发导致心跳失败,请使用最新版本号重试", "并发导致心跳失败,请使用最新版本号重试")
    ;

    private int code;
    private String info;
    private String detail;

    CoordinResultEnum(int code, String info, String detail) {
        this.code = code;
        this.info = info;
        this.detail = detail;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String info() {
        return info;
    }

    @Override
    public String detail() {
        return detail;
    }
}
